/* eslint-disable @typescript-eslint/no-explicit-any */

export type ObjectWithGivenValues<O extends { [key: string]: any }, T> = {
  [key in keyof O]: T;
};

export type ProtoExtends<T extends { [key: string]: any }, U extends { [key: string]: any }> = U & Omit<T, keyof U>;

export type Pagination<T> = { count: number; rows: ReadonlyArray<T> };

export type Paginated<T> = { count: number; rows: T };

export type Writable<T> = { -readonly [P in keyof T]: T[P] };

export type PropsType<T> = T extends (...props: infer U) => any ? U : never;

export type ComponentPropsType<T extends (props: any) => any> = PropsType<T>[0];
